import request from '@/utils/request'

export function listUser(params) {
  return request({
    url: '/admin/user/list',
    method: 'get',
    params
  })
}

export function infoUser(user_id) {
  return request({
    url: `/admin/user/info/${user_id}`,
    method: 'get'
  })
}

export function addUser(data) {
  return request({
    url: '/admin/user/create',
    method: 'post',
    data
  })
}

export function delUser(user_id) {
  return request({
    url: `/admin/user/delete/${user_id}`,
    method: 'post'
  })
}

export function updateUser(user_id, data) {
  return request({
    url: `/admin/user/update/${user_id}`,
    method: 'post',
    data
  })
}
